file_mounts:
  # Mounting private buckets in COPY mode with a source dir
  /mount_private_copy:
    name: {{storage_name}}
    source: ~/tmp-workdir
    store: r2
    mode: COPY

  # Mounting private buckets in COPY mode with a list of files as source
  /mount_private_copy_lof:
    name: {{storage_name}}
    source: ['~/tmp-workdir/tmp file', '~/tmp-workdir/tmp file2']
    store: r2
    mode: COPY

  # Mounting private buckets in MOUNT mode
  /mount_private_mount:
    name: {{storage_name}}
    source: ~/tmp-workdir
    store: r2
    mode: MOUNT

run: |
  set -ex

  # Check private bucket contents
  ls -ltr /mount_private_copy/foo
  ls -ltr /mount_private_copy/tmp\ file
  ls -ltr /mount_private_copy_lof/tmp\ file
  ls -ltr /mount_private_copy_lof/tmp\ file2
  ls -ltr /mount_private_mount/foo
  ls -ltr /mount_private_mount/tmp\ file
  
  # Symlinks are not copied to buckets
  ! ls /mount_private_copy/circle-link
  ! ls /mount_private_mount/circle-link
  
  # Write to private bucket in MOUNT mode should pass
  echo "hello" > /mount_private_mount/hello.txt